package com.xiaotao.es.domain.dto;

import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 文档基础表
 * @author xiaotao
 */
@Data
@Document(indexName = "document")
public class DocumentDto implements Serializable {
    @Field(type = FieldType.Keyword)
    private String id;

    /**
     * 书名
     */
    @Field(type = FieldType.Text,analyzer = "ik_smart")
    private String name;

    /**
     * 作者
     */
    @Field(type = FieldType.Keyword)
    private String author;

    @Field(type = FieldType.Text,analyzer = "ik_smart")
    private String content;

    @Field(type = FieldType.Text,analyzer = "ik_smart")
    private String abstractContent;

    @Field(type = FieldType.Text,analyzer = "ik_smart")
    private String note;

    @Field(type = FieldType.Text,analyzer = "ik_smart")
    private String category;

    @Field(type = FieldType.Date,analyzer = "ik_smart")
    private LocalDateTime abstractTime;

}
